﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Share/Site2.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Sport.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="Scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="http://connect.facebook.net/en_US/all.js" type="text/javascript"></script>
    <script type="text/javascript">
        var pageIndex = 1;
        var pageCount = 1;
        $(window).scroll(function () {
            if ($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
         /*   if ($(window).scrollTop() == $(document).height() - $(window).height()) {*/
                GetRecords();  
            }
        });
        function GetRecords() {
            if (true) {
                $("#loader").show();
                $.ajax({
                    type: "POST",
                    url: "Default.aspx/GetCustomers",
                    data: '{pageIndex: ' + pageIndex + '}',
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: OnSuccess,
                    failure: function (response) {
                        alert(response.d);
                    },
                    error: function (response) {
                        alert(response.d);
                    }
                });
            }
        }
        function OnSuccess(response) {
            var xmlDoc = $.parseXML(response.d);
            var xml = $(xmlDoc);
            var customers = xml.find("News");
            var table = $("#dvCustomers table").eq(1).clone(true);
            customers.each(function () {
                var customer = $(this);
                $("#Title", table).html(customer.find("Title").text());
                $("#udAuthor", table).html(customer.find("udAuthor").text());
                $("#fbLinkCurrentPage", table).attr("href", customer.find("LinkCurrentPage").text());
                $("#LinkCurrentPage", table).attr("href", customer.find("LinkCurrentPage").text());
                $("#Title", table).attr("href",customer.find("LinkCurrentPage").text());
                $("#Description", table).html(customer.find("Description").text());
                $("#ImageTitle", table).html(customer.find("udImageTitle").text());
                $("#udHour", table).html(customer.find("udHour").text());
            });
            $("#dvCustomers").append(table);
            $("#loader").hide();
        }

        $(document).ready(function () {
            $("#aThank").hide();
            $("#aFlag").hide();
            $("#NewFeedDetail").hide();
        });
        !function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + '://platform.twitter.com/widgets.js'; fjs.parentNode.insertBefore(js, fjs); } }(document, 'script', 'twitter-wjs');
    </script>
    <style type="text/css">
        .yt-lockup2-tile .yt-lockup2-meta-info > li:before {
            color: #999999;
            content: "•";
            margin: 0 5px;
        }

        .feed-item-container .feed-item-main {
            border-bottom: 1px solid #E2E2E2;
            color: #555555;
            font-size: 12px;
            margin: 4px 0 -1px;
            min-height: 45px;
            overflow: hidden;
            padding: 8px 0 10px;
        }

        .yt-ui-ellipsis-wrapper {
            display: block;
            color: #2793E6;
            line-height: 1.2em;
        }

        .title1 {
            font-size: 15px;
            font-weight: bold;
            line-height: 15px;
        }

        .divmain {
            border-bottom: 1px solid #E8E8E8;
            padding-bottom: 20px;
            padding-top: 20px;
            padding-left: 12px;
            padding-right: 5px;
            background-color: white;
        }

        .time {
            color: #999999;
            font-size: 12px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Repeater ID="rptCustomers" runat="server">
        <itemtemplate>
                         <div id="dvCustomers" > 
                                          <table >
                                                        <tr>
                                                            <td class="divmain">
                                                                <span id="ImageTitle" class="Detail">
                                                                <%# Eval("udImageTitle")%></span>
                                                            </td>
                                                            <td  class="divmain">
                                                                <div style=" width: 100%;text-align: left" class="title1">
                                                        <a   id="Title" rel="bookmark" href='<%# Eval("LinkCurrentPage")%>'>
                                                        <%# Eval("Title")%></a>
                                                     </div>
                                              <div style="float: left; font-size: 12px;padding-top: 5px" >
                                                <li><span id="udAuthor"><%# Eval("udAuthor")%></span></li>
                                            </div>
                                                                 <div  style="float: right;">
                                                    <span id="udHour" style="font-size: 12px;padding-top: 5px;padding-right: 5px"><%# Eval("udHour")%></span>
                                              </div>
                                                                        <div style="float: left; text-align: left; padding-top: 5px">
                                                                            <span id="Description" style="text-align: left;font-size: 13.5px;">
                                                            <%# Eval("Description")%>
                                                                            </span>  
                                                                        </div>   
                                                                 <div  style="float: left;padding-left: 15px;padding-top: 10px">
                                                                       <div data-show-faces="false" data-width="150" data-layout="button_count" data-send="false" data-href="http://thethao.vnexpress.net/video/video/cac-vu-au-da-bao-luc-nhat-trong-lich-su-bong-da-2860866.html" class="fb-like fb_edge_widget_with_comment fb_iframe_widget" fb-xfbml-state="rendered"><span style="height: 20px; width: 71px;"><iframe scrolling="no" id="f2852ce4beabd6a" name="f35dfe60e026484" style="border: medium none; overflow: hidden; height: 20px; width: 71px;" title="Like this content on Facebook." class="fb_ltr" src="http://www.facebook.com/plugins/like.php?api_key=&amp;locale=en_US&amp;sdk=joey&amp;channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D25%23cb%3Df19938f4eb81344%26origin%3Dhttp%253A%252F%252Fthethao.vnexpress.net%252Ff3570adc0ccadd%26domain%3Dthethao.vnexpress.net%26relation%3Dparent.parent&amp;href=http%3A%2F%2Fthethao.vnexpress.net%2Fvideo%2Fvideo%2Fcac-vu-au-da-bao-luc-nhat-trong-lich-su-bong-da-2860866.html&amp;node_type=link&amp;width=150&amp;layout=button_count&amp;colorscheme=light&amp;show_faces=false&amp;send=false&amp;extended_social_context=false"></iframe></span></div>
                        <iframe scrolling="no" frameborder="0" style="width:80px; height:21px;" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fthethao.vnexpress.net%2Fvideo%2Fvideo%2Fcac-vu-au-da-bao-luc-nhat-trong-lich-su-bong-da-2860866.html&amp;via=C%C3%A1c+v%E1%BB%A5+%E1%BA%A9u+%C4%91%E1%BA%A3+b%E1%BA%A1o+l%E1%BB%B1c+nh%E1%BA%A5t+trong+l%E1%BB%8Bch+s%E1%BB%AD+b%C3%B3ng+%C4%91%C3%A1&amp;text=C%C3%A1c+v%E1%BB%A5+%E1%BA%A9u+%C4%91%E1%BA%A3+b%E1%BA%A1o+l%E1%BB%B1c+nh%E1%BA%A5t+trong+l%E1%BB%8Bch+s%E1%BB%AD+b%C3%B3ng+%C4%91%C3%A1" allowtransparency="true"></iframe>
                        <div style="text-indent: 0px; margin: 0px; padding: 0px; background: none repeat scroll 0% 0% transparent; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 90px; height: 20px;" id="___plusone_0"><iframe width="100%" scrolling="no" frameborder="0" hspace="0" marginheight="0" marginwidth="0" style="position: static; top: 0px; width: 90px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 20px;" tabindex="0" vspace="0" id="I0_1375802929125" name="I0_1375802929125" src="https://apis.google.com/u/0/_/+1/fastbutton?bsv&amp;annonation=none&amp;size=medium&amp;hl=en-US&amp;origin=http%3A%2F%2Fthethao.vnexpress.net&amp;url=http%3A%2F%2Fthethao.vnexpress.net%2Fvideo%2Fvideo%2Fcac-vu-au-da-bao-luc-nhat-trong-lich-su-bong-da-2860866.html&amp;gsrc=3p&amp;ic=1&amp;jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.-3ZBlSOpwC0.O%2Fm%3D__features__%2Fam%3DEQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAItRSTPgVfSHz39LXZ9Vpr-FtVvwun5OUQ#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled&amp;id=I0_1375802929125&amp;parent=http%3A%2F%2Fthethao.vnexpress.net&amp;pfname=&amp;rpctoken=54864572" allowtransparency="true" data-gapiattached="true" title="+1"></iframe></div>
                                                    </div>         
                                                            </td>
                                                        </tr>
                                                    </table>
                                      </div>
                                                    
                                             
    
       </itemtemplate>
    </asp:Repeater>

    <div id="footer">
        <img id="loader" alt="" src="Images/loading.gif" style="display: none" />
    </div>
</asp:Content>
